]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
style: New window-icon class to split it from icon-dropshadow
authorSam Hewitt <snwh@gnome.org>
Mon, 13 May 2024 15:40:35 +0000 (13:10 -0230)
committerSam Hewitt <snwh@gnome.org>
Mon, 13 May 2024 15:41:51 +0000 (13:11 -0230)
- new class for window icons in window picker
- move HC specific styles to this new class

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/507
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3310>

data/theme/gnome-shell-sass/widgets/_base.scss
data/theme/gnome-shell-sass/widgets/_window-picker.scss
js/ui/windowPreview.js

index 7d6f2809e85002813645d2c0a7db6eafe9dd061c..20a1666e2f6354e00d8b1fd15b8828ca4e800425 100644 (file)
 
   @if $contrast == 'high' {
     icon-shadow: none;
-    background-color: $osd_bg_color;
-    padding: $base_padding * 2;
-    border-radius: $modal_radius;
-    border: 2px solid $hc_inset_color;
-    margin: $base_padding * 3;
   }
 }
index c500a0af74483bb71e3b255b333c17d445f46b30..75626633fae5ed177fd18fe683f13142a15f9b4c 100644 (file)
@@ -7,6 +7,19 @@ $window_close_button_color: transparentize(lighten($system_bg_color, 7%), .02);
   spacing: $base_padding;
 }
 
+// Window icons
+.window-icon {
+  // styled only with .icon-dropshadow
+  // but has a different style in high-contrast
+  @if $contrast == 'high' {
+    background-color: $osd_bg_color;
+    padding: $base_padding * 2;
+    border-radius: $modal_radius;
+    border: 2px solid $hc_inset_color;
+    margin: $base_padding * 3;
+  }
+}
+
 // Window titles
 .window-caption {
   @extend %tooltip;
index d865e6e25b72f58658b717e0e525008c7800917e..b98079b2875d73defdacd5bad2d159f07ccf898b 100644 (file)
@@ -133,6 +133,7 @@ export const WindowPreview = GObject.registerClass({
         const tracker = Shell.WindowTracker.get_default();
         const app = tracker.get_window_app(this.metaWindow);
         this._icon = app.create_icon_texture(ICON_SIZE);
+        this._icon.add_style_class_name('window-icon');
         this._icon.add_style_class_name('icon-dropshadow');
         this._icon.set({
             reactive: true,